import VueRouter from 'vue-loader'

import Home from './component/home/Home.vue'
import HomeList from './component/home/List.vue'
import Login from './component/user/Login.vue'
import Register from './component/user/Register.vue'
import TopicsNew from './component/topics/New.vue'
import TopicsShow from './component/topics/Show.vue'
import TopicsEdit from './component/topics/Edit.vue'
import List from './component/common/list.vue'
import Profile from './component/setings/profile.vue'



export default new VueRouter({
    routes: [{
            path: '/',
            component: Home,
            children: [
                {
                path: '',
                component: HomeList,
                },
                {
                    path: '/topics/new',
                    component: TopicsNew
                },
                {
                    name: 'edit',
                    path: '/topics/edit/:id',
                    component: TopicsEdit
                },
                {
                    name: 'user',
                    path: '/topics/show/:id',
                    component: TopicsShow
                },
                {
                
                    path: '/profile',
                    component: Profile
                }
            ]
            },
            {
                path: '/login',
                component: Login
            },
            {
                path: '/register',
                component: Register
            },
            {
                path: '/list',
                component: List
            },

    ]
})